package com.weimai.message.gateway.serviceasync.impl;

import com.weimai.message.gateway.anno.AsyncServiceHandler;
import com.weimai.message.gateway.model.BaseAsyncService;
import com.weimai.message.gateway.serviceasync.SmsAsyncService;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import org.springframework.stereotype.Component;

/**
 * 描述：
 * Copyright (c) 2018 Choice, Inc.
 * All Right Reserved.
 * Choice Proprietary and Confidential.
 *
 * @Author geer
 * @Since 2018/11/18
 * @Version 1.0
 **/
@Component
@AsyncServiceHandler
public class SmsAsyncServiceImpl implements SmsAsyncService, BaseAsyncService {
    
    
    @Override
    public void sendSms(String phoneNumbers, String smsContent, String accountNo, Handler<AsyncResult<String>> resultHandler) {
        // TODO 发送消息具体实现
        try {
            Future.succeededFuture("msid1234567").setHandler(resultHandler);
        } catch (Exception e) {
            resultHandler.handle(Future.failedFuture(e));
        }
    }
}
